package cho114366.swing;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.Toolkit;

public class Swing2 extends JDialog {

	private final JPanel mnComp = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			Swing2 dialog = new Swing2();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public Swing2() {
		setIconImage(Toolkit.getDefaultToolkit().getImage(Swing2.class.getResource("/cho114366/swing/icon/icon.png")));
		setBounds(100, 100, 640, 480);
		getContentPane().setLayout(new BorderLayout());
		mnComp.setLayout(new FlowLayout());
		mnComp.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(mnComp, BorderLayout.CENTER);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("확인");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
		{
			JMenuBar menuBar = new JMenuBar();
			setJMenuBar(menuBar);
			{
				JMenu mnNewMenu = new JMenu("파일(F)");
				menuBar.add(mnNewMenu);
				{
					JMenuItem mntmNewMenuItem = new JMenuItem("새로만들기(N)");
					mnNewMenu.add(mntmNewMenuItem);
				}
				{
					JMenuItem mntmNewMenuItem_1 = new JMenuItem("New menu item");
					mnNewMenu.add(mntmNewMenuItem_1);
				}
				{
					JMenuItem mntmNewMenuItem_2 = new JMenuItem("New menu item");
					mnNewMenu.add(mntmNewMenuItem_2);
				}
			}
			{
				JMenu mnNewMenu_1 = new JMenu("편집(E)");
				menuBar.add(mnNewMenu_1);
				{
					JMenuItem mntmNewMenuItem_3 = new JMenuItem("New menu item");
					mnNewMenu_1.add(mntmNewMenuItem_3);
				}
				{
					JMenuItem mntmNewMenuItem_4 = new JMenuItem("New menu item");
					mnNewMenu_1.add(mntmNewMenuItem_4);
				}
			}
			{
				JMenu mnNewMenu_2 = new JMenu("");
				menuBar.add(mnNewMenu_2);
			}
			{
				JMenu mnNewMenu_3 = new JMenu("서식(O)");
				menuBar.add(mnNewMenu_3);
			}
			{
				JMenu menu = new JMenu("");
				menuBar.add(menu);
			}
			{
				JMenu mnNewMenu_4 = new JMenu("도움말(H)");
				menuBar.add(mnNewMenu_4);
				{
					JMenuItem mntmNewMenuItem_5 = new JMenuItem("도움말정보");
					mnNewMenu_4.add(mntmNewMenuItem_5);
				}
			}
		}
	}

}
